import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'redirect',
      redirect: '/user/index',
    },
    {
      // 用户
      path: '/user/index',
      name: 'user',
      component: () => import('@/views/uesr/index.vue'),
    },
    {
      // 用户=>用户列表
      path: '/user/list',
      name: 'user-list',
      component: () => import('@/views/uesr/list.vue'),
    },
  ],
})

export default router
